package com.himiotech;

import org.apache.shiro.codec.Base64;

import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import java.security.NoSuchAlgorithmException;

@Deprecated
public class GenKey {

    /**
     * 目前已经不需要此方法了请忽略
     *
     * @param args
     * @throws NoSuchAlgorithmException
     */
    @Deprecated
    public static void main(String[] args) throws NoSuchAlgorithmException {
        KeyGenerator keygen = KeyGenerator.getInstance("AES");
        SecretKey deskey = keygen.generateKey();
        System.out.println(Base64.encodeToString(deskey.getEncoded()));
    }
}
